<?php 
header("Content-type:text/html;charset=utf-8");
include_once 'sys/conn/conn.php';
if (isset($_POST["submit"])){
	$name = $_POST["name"];
	$zt = $_POST["zt"];
	$email = $_POST["email"];
	$phone = $_POST["phone"];
	$info = $_POST["zx_info"];
	$date = date("Y-m-d");
	if (!empty($name) && !empty($zt) && !empty($email) && !empty($phone) && !empty($info)){
		$sql = mysql_query("insert into tb_message (name,zt,email,phone,info,date) values ('$name','$zt','$email','$phone','$info','$date')");
		if ($sql){
			echo "<script type=\"text/javascript\">alert('留言提交成功');window.location.href='services.php';</script>";
		}else {
			echo "<script type=\"text/javascript\">alert('留言提交失败');history.back();</script>";
		}
	}else {
		echo "<script type=\"text/javascript\">alert('信息不能为空！！');history.back();</script>";
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>中科智远--客服中心</title>
<link rel="stylesheet" href="style/style.css" type="text/css" />
<link rel="stylesheet" href="style/select2css.css" type="text/css" />
</head>

<body>
	<?php include_once 'header.php';?>
    <div class="menu">
    	<ul>
        	<li class="home"><a href="index.php" target="_self">首页</a></li>
            <li class="aboutZY"><a href="aboutZY.php" target="_self">关于智远</a>
			<li class="news"><a href="news.php" target="_self">新闻中心</a></li>
            <li class="products"><a href="spjk.php" target="_self">产品中心</a></li>
			<li class="kf kf_st"><a href="services.php" target="_self">客服中心</a></li>
            <li class="joinUs"><a href="joinUs.php" target="_self">加入我们</a></li>
        </ul>
        <div class="language">
            <div id="uboxstyle">
                <select name="language" id="language">
                    <option value="English">English</option>
                    <option value="简体中文" selected="selected">简体中文</option>
                </select>
            </div>
            <script type="text/javascript" src="js/select2css.js"></script>
        </div>
    </div>
    <div class="normal"><img src="images/kf.jpg" width="938" height="106" alt="客服中心" /></div>
    <div class="shadow"><img src="images/shadow.jpg" width="946" height="22" alt="" /></div>
    <div class="middle">
    	<div class="left">
        	<div class="list_tit">客服中心</div>
            <div class="list">
            	<p><img src="images/contact.jpg" width="156" height="99" alt="联系方式" /></p>
            </div>
            <div class="list_bot"><img src="images/list_bot.png" width="182" height="24" alt="list_bot" /></div>
        </div>
        <div class="right">
        	<div class="content_addr">所在位置：客服中心</div>
            <div class="content">
            	<div class="box"><img src="images/lc.jpg" width="514" height="210" alt="流程图" /></div>
                <div class="message">
                	<form method="post" action="">
                    	<table width="100%" cellpadding="0" cellspacing="4" border="0">
                        	<tr>
                            	<td width="20%" class="special">姓名：</td>
                                <td width="80%"><input type="text" name="name" />(<font style="color:#f00;">*</font>)</td>
                            </tr>
                            <tr>
                            	<td class="special">主题：</td>
                                <td><input type="text" name="zt" />(<font style="color:#f00;">*</font>)</td>
                            </tr>
                            <tr>
                            	<td class="special">E-mail：</td>
                                <td><input type="email" name="email" />(<font style="color:#f00;">*</font>)</td>
                            </tr>
                            <tr>
                            	<td class="special">电话：</td>
                                <td><input type="tel" name="phone" />(<font style="color:#f00;">*</font>)</td>
                            </tr>
                            <tr>
                            	<td class="special">资讯信息：</td>
                                <td><textarea name="zx_info" style="width:320px; height:160px;"></textarea>(<font style="color:#f00;">*</font>)</td>
                            </tr>
                            <tr>
                            	<td colspan="2">
                                	<input type="submit" name="submit" value="提交" class="btn lef" /><input class="btn" type="reset" name="reset" value="重置" />
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
            <div class="content_bot"><img src="images/content_bot.png" width="756" height="10" alt="content_bot" /></div>
        </div>
    </div>
    <?php include_once 'footer.php';?>
</body>
</html>